#ifndef __DATE_H__
#define __DATE_H__

#include <string>
#include <iostream>

namespace stock_trade{

class Date{
public:
    Date(int year, int month, int day):year(year), month(month), day(day){}
    Date(const std::string& strDate);
    Date(){}
    Date GetNextDay();
    std::string toString() const;
    bool operator==(const Date& date) const;
    bool operator!=(const Date& date) const;
    bool operator>(const Date& date) const;
    bool operator<(const Date& date) const;
    bool operator>=(const Date& date) const;
    bool operator<=(const Date& date) const;
    int operator-(const Date& date) const;
    Date operator++();
    Date operator--();
//    friend std::ostream& operator<<(std::ostream& os, const Date& date);
    int year;
    int month;
    int day;
};
}
std::ostream& operator<<(std::ostream& os, const stock_trade::Date& date);
stock_trade::Date GetToday();
stock_trade::Date GetYesterday();
#endif
